package ma.ensao.evalmetrics.controller.metrics;

import java.io.File;
import java.io.IOException;
import ma.ensao.evalmetrics.model.MPF;
import ma.ensao.evalmetrics.util.javaProjects.MPFMetric;

/*
* Calcule l'encapsulation
* MPF repr�sente la moyenne des m�thodes cach�s (protected) par rapport � tous les m�thodes du syst�me.
*/

public class MPFManager {
	private MPF mpf=new MPF();
	double nmbre;
	private int nbMethods=0;
	public MPF read(File file) throws IOException {
		    MPFMetric mM = new MPFMetric(file);
		    setNmbre(mM.getMpf());
		    this.setNbMethods(mM.getNbMethods());
		    mpf.setNmbre(getNmbre());
		    mpf.setNbMethods(getNbMethods());
			return mpf;
	}
	public MPF getMpf() {
		return mpf;
	}
	public void setMpf(MPF mpf) {
		this.mpf = mpf;
	}
	public double getNmbre() {
		return nmbre;
	}
	public void setNmbre(double nmbre) {
		this.nmbre = nmbre;
	}
	public int getNbMethods() {
		return nbMethods;
	}
	public void setNbMethods(int nbMethods) {
		this.nbMethods = nbMethods;
	}
}